Fix incremental access to hypervisor console log
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 13:19:16 +0000 (13:19 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 13:19:16 +0000 (13:19 +0000)
"xenconsoled --log=hv" outputs duplicated messages to
/var/log/xen/hypervisor.log.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/drivers/char/console.c

index b1ed507f18e254a0575ff81e528060464c6cefd8..82f74e47459c6f8f8a0347f5eba807ebe8970567 100644 (file)
@@ -198,7 +198,7 @@ long read_console_ring(struct xen_sysctl_readconsole *op)
     sofar = 0;
 
     c = conringc;
-    if ( op->incremental && ((int32_t)(op->index - c) < 0) )
+    if ( op->incremental && ((int32_t)(op->index - c) > 0) )
         c = op->index;
 
     while ( (c != conringp) && (sofar < max) )